<%@page import="java.util.ArrayList"%>
<%
//==================================================================================
// 프로그램명 : 언어별메세지관리(시스템전용)
// 작성 : 2012-03-09 최준호
// 비고 :
//----------------------------------------------------------------------------------
// 수정 :
//==================================================================================
%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<% request.setCharacterEncoding("UTF-8"); %>
<%@page import="java.sql.*"%>
<%
Connection conn = null;

try
{
    ArrayList<Object> AL = new ArrayList<Object>();
    String params = "";
    String returnMsg = "";

    if(!request.getParameter("MSG_CD").equals(new_MSG_CD))
    {
        params  = "D⊥"                                               //PROC_FG
                + request.getParameter("MSG_USE_FG")+"⊥"             //MSG_USE_FG
                + new_MSG_CD+"⊥"                                     //MSG_CD
                + request.getParameter("f_MSG_CLASS")+"⊥"            //MSG_CLASS
                + request.getParameter("f_MSG_SEQ")+"⊥"              //MSG_SEQ
                + "♪";
        returnMsg = udf.UdfBean.IUDQuery(request, conn, "SP_CET_MSGHD_T_IUD01", params);
        if(!returnMsg.equals("0000"))   throw new Exception(returnMsg); // 강제로 exception 발생

        params  = "I⊥"                                               //PROC_FG
                + request.getParameter("MSG_USE_FG")+"⊥"             //MSG_USE_FG
                + new_MSG_CD+"⊥"                                     //MSG_CD
                + request.getParameter("f_MSG_CLASS")+"⊥"            //MSG_CLASS
                + request.getParameter("f_MSG_SEQ")+"⊥"              //MSG_SEQ
                + "♪";
        returnMsg = udf.UdfBean.IUDQuery(request, conn, "SP_CET_MSGHD_T_IUD01", params);
        if(!returnMsg.equals("0000"))   throw new Exception(returnMsg); // 강제로 exception 발생
    }

    out.println ("<script>"
                +"alert('저장되었습니다.');"
                +"top.opener.doAction('search','1');"
                +"self.close();"
                +"</script>");

    conn.commit();
}
catch (Exception e)
{
    e.printStackTrace();
    if(conn != null) { try { conn.rollback(); } catch(Exception e2) { e2.printStackTrace(); } }
    out.println(udf.UdfBean.ErrorShow(e.getMessage()+"╋"+request.getRequestURL(),"popup",""));
}
finally { if(conn != null) { try { new CommonCon().disConnection(conn,request); } catch(Exception e) { e.printStackTrace(); } } }
%>
